Image processing device, image processing method, and non-transitory computer-readable recording medium

ABSTRACT

An image processing device divides a recognition purpose image into a plurality of areas, selects feature points in the recognition purpose image such that a bias of the number of the feature points included in each of the areas is small registers information on the selected feature points in the recognition purpose image in a memory and estimates a position and an orientation of the camera based on the recognition purpose image registered in the memory and based on a captured image captured by a camera.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of theprior Japanese Patent Application No. 2016-170090, filed on Aug. 31,2016, the entire contents of which are incorporated herein by reference.

FIELD

The embodiment discussed herein is directed to an image processingdevice and the like.

BACKGROUND

There is a technology that obtains the position and the orientation of acamera with respect to a captured image based on the captured image ofthe camera attached to a personal computer (PC), a mobile terminal, orthe like. Furthermore, there is an augmented reality (AR) technologythat superimposes, by using the position and the orientation of acamera, additional information, such as computer graphics (CG), or thelike, onto a captured image displayed on a screen of a PC, a mobileterminal, or the like and that implements a work support for a user.

FIG. 11 is a schematic diagram illustrating an example of the ARtechnology. As illustrated in FIG. 11, for example, if a user capturesboth an image of a marker 11 and a check target 12 by using a camerathat is built into a mobile terminal 10, object information 13 withrespect to the marker 11 is displayed on a screen 10 a of the mobileterminal 10.

As a method of obtaining the position and the orientation of a camera,there is a conventional technology 1 that calculates the position andthe orientation of the camera by using, for example, feature pointsincluded in a captured image. The conventional technology 1 detects thefeature points based on the state in which the variation in shadings inthe vicinity of the point of interest is great and the position of thepoint of interest on the image is uniquely specified due to thevariation in shadings. The conventional technology 1 uses a set ofthree-dimensional coordinates of the previously created feature points.In a description below, the three-dimensional coordinates of thepreviously created feature points is appropriately referred to as mappoints and a set of the map points is appropriately referred to as athree-dimensional map. The conventional technology 1 calculates theposition and the orientation of the camera by associating the featurepoints that are present in the captured image at the present time withthe projected map points in the captured image.

FIG. 12 is a schematic diagram illustrating the conventional technology1 that obtains the position and the orientation of a camera. In theexample illustrated in FIG. 12, it is assumed that map points S₁ to S₆are present. A certain map point S₁ is represented by Equation (1) inthe world coordinate system. It is assumed that feature points x₁ to x₆are present in a captured image 20. A certain feature point x_(i) isrepresented by Equation (2) in a camera coordinate system. It is assumedthat the map points projected on the captured image 20 are projectionpoints x₁′ to x₆′. A certain projection point x_(i)′ is represented byEquation (3) in the camera coordinate system.

S _(i)=(x,y,z)  (1)

x _(i)=(u,v)  (2)

x _(i)′=(u′,v′)  (3)

For example, in the conventional technology 1, the position and theorientation of the camera are obtained by calculating a cameraposition/orientation matrix RT in which the sum of squares E calculatedby Equation (4) becomes the minimum. The process of estimating theposition and the orientation of the camera for each of the series ofcaptured images is referred to as “tracking”.

$\begin{matrix}{E = {\sum\limits_{P}{{x_{P}^{\prime} - x_{P}}}^{2}}} & (4)\end{matrix}$

Subsequently, the conventional technology 1 that creates athree-dimensional map will be described. FIG. 13 is a schematic diagramillustrating the conventional technology 1 that creates athree-dimensional map. For example, the conventional technology 1 uses aprinciple of stereo image capturing. The conventional technology 1associates the same feature points in two captured images that areobtained from different image capturing positions. The conventionaltechnology 1 creates a three-dimensional map in which the associatedpoints are used as map points based on the positional relationshipbetween the multiple associated points that are present in each of thecaptured images.

In the example illustrated in FIG. 13, it is assumed that the map pointto be restored is represented by S_(i) and the intersection point of theline connecting an initial image capturing position Ca of the camera tothe map point S_(i) and a first captured image 20 a is represented by afeature point x_(ai). It is assumed that the intersection point of theline connecting a second image capturing position Cb of the camera tothe map point S_(i) and a second captured image 20 b is represented by afeature point x_(bi). Then, the associated points are a feature pointx_(ai) and a feature point x_(bi). The conventional technology 1calculates the three-dimensional coordinates of the map point S_(i)based on the relationship between the feature points x_(ai) and x_(bi)and the map point S_(i) based on the principle of stereo imagecapturing.

In general, the position and the image capturing direction of the cameraof the first captured image is used for the origin of thethree-dimensional coordinates of the three-dimensional map. FIG. 14 is aschematic diagram illustrating an example of a definition of the imagecapturing direction of the camera. As illustrated in FIG. 14, the originof the three-dimensional coordinates of the three-dimensional map isdefined based on, for example, the position (T_(x), T_(y), T_(z)) andthe orientation (R_(x), R_(y), R_(z)) of a camera 50.

There is a conventional technology 2 as a technology that similarly usesthe feature points included in a captured image and that is similar tothe conventional technology 1. FIG. 15 is a schematic diagramillustrating the conventional technology 2. The conventional technology2 determines whether a previously prepared recognition purpose image isincluded in a captured image. As a recognition purpose image, an image,such as a photograph, an illustration, an icon, or the like, is used. Inthe recognition purpose image, information on the coordinate position ofa feature point and information on a feature amount of the feature pointare associated. The feature amount is a numerical value vector used todistinguish differences between the other feature points and indicatesthe density distribution of a plurality of pixels in the vicinity of thefeature point.

The conventional technology 2 compares the feature amounts of thefeature points in the captured image with the feature amounts of thefeature points in each of the recognition purpose images and determinesthat the recognition purpose image in which the match rate of thefeature amounts is the highest is included in the captured image. Whendetermining the recognition purpose image included in the capturedimage, the conventional technology 2 calculates, similarly to theconventional technology 1, the position and the orientation of thecamera by using each of the coordinate positions associated with thedetermined recognition purpose image as a three-dimensional map.

In the example illustrated in FIG. 15, it is assumed that recognitionpurpose images 1 to 5 are stored in a database. It is assumed thatfeature points 1 a to 1 d are included in a recognition purpose image 1and assumed that the feature amounts of the respective feature pointsare 70, 110, 70, and 110. It is assumed that feature points 2 a to 2 dare included in a recognition purpose image 2 and assumed that thefeature amounts of the respective feature points are 70, 70, 110, and110. It is assumed that feature points 3 a to 3 e are included in arecognition purpose image 3 and assumed that the feature amounts of therespective feature points are 108, 108, 108, 108, and 108. It is assumedthat feature points 4 a to 4 d are included in a recognition purposeimage 4 and assumed that the feature amounts of the respective featurepoints are 90, 90, 90, and 90. It is assumed that feature points 5 a to5 c are included in a recognition purpose image 5 and assumed that thefeature amounts of the respective feature points are 60, 60, and 60.

The conventional technology 2 detects feature points 6 a to 6 d from acaptured image 6 and sets the feature amounts of the respective featurepoints to 90, 90, 90, and 90. The conventional technology 2 compares thefeature amounts of the feature points 6 a to 6 d in the captured image 6with the feature amounts of the respective feature points in therecognition purpose images 1 to 5. The conventional technology 2 detectsthe recognition purpose image 4 that includes the feature amounts thatis matched with the feature amounts of the feature points 6 a to 6 d.The conventional technology 2 determines that the recognition purposeimage 4 is included in an area 7 in the captured image 6 and calculatesthe position and the orientation of the camera by using, as the mappoints, the coordinate positions associated with the feature points 4 ato 4 d in the recognition purpose image 4.

Patent Document 1: Japanese Laid-open Patent Publication No. 2013-141049

Patent Document 2: Japanese Laid-open Patent Publication No. 2014-164483

However, with the conventional technology described above, there is aproblem in that it is not possible to continuously and stably perform atracking by using a recognition purpose image.

In general, in a case of calculating the position and the orientation ofa camera, in principle, the following relationship is present betweenthe feature points and the accuracy. Namely, as map points are widelydistributed in a captured image, the accuracy of calculating theposition and the orientation of the camera becomes high. Furthermore, asthe number of map points present in a captured image is increased, theaccuracy of calculating the position and the orientation becomes high.

There may be a case in which the positional distribution of the detectedfeature points is biased depending on a recognition purpose image. FIGS.16 and 17 are schematic diagrams each illustrating a problem of theconventional technology. In FIG. 16, in a recognition purpose image 30A,the distribution of the feature points is uniform; however, in arecognition purpose image 30B, the distribution of the feature points isbiased. By using the recognition purpose images 30A and 30B, regardingthe process of determining the recognition purpose image included in thecaptured image, the determination accuracy is not decreased regardlessof whether the distribution is uniform. However, if the recognitionpurpose image 30B is included in the captured image and a tracking isattempted by using the recognition purpose image 30B, the map points arenot widely distributed in the recognition image and thus the calculationaccuracy of the position and the orientation of the camera is decreased.

In order to solve the problem described above, it is conceivable toalleviate a detection condition of the feature points and simplyincrease the feature points in the recognition purpose image. However,if the number of feature points is simply increased, a new problem, suchas an increase in processing time at the time of tracking, or the like,occurs.

In the example illustrated in FIG. 17, the types of the recognitionpurpose images that are present in the captured images are the same;however, the areas in each of which the recognition purpose image isdetected are different. If a recognition purpose image is present in acentral area 35A of the captured image, the distribution of the mappoints is uniform and thus the calculation accuracy of the position andthe orientation of the camera is not decreased. However, if therecognition purpose image is present in an area 35B that is the edge ofthe captured image, the map points are biased in terms of the entirecaptured image and thus the calculation accuracy of the position and theorientation of the camera is decreased.

SUMMARY

According to an aspect of an embodiment, an image processing deviceincludes a memory; and a processor coupled to the memory, wherein theprocessor executes a process including: dividing a recognition purposeimage into a plurality of areas; selecting feature points in therecognition purpose image such that a bias of the number of the featurepoints included in each of the areas is small; registering informationon the selected feature points in the recognition purpose image in thememory; and estimating a position and an orientation of the camera basedon the recognition purpose image registered in the memory and based on acaptured image captured by a camera.

The object and advantages of the invention will be realized and attainedby means of the elements and combinations particularly pointed out inthe claims.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory and arenot restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a functional block diagram illustrating the configuration ofan image processing device according to an embodiment;

FIG. 2 is a schematic diagram illustrating an example of the datastructure of a recognition purpose image table;

FIG. 3 is a schematic diagram illustrating an example of the datastructure of feature point map information;

FIG. 4 is a schematic diagram illustrating a process performed by aregistration unit;

FIG. 5 is a schematic diagram illustrating an internal area and anexternal area;

FIG. 6 is a schematic diagram illustrating an update process performedon the feature point map information;

FIG. 7 is a flowchart illustrating the flow of a process performed bythe image processing device according to the embodiment;

FIG. 8 is a flowchart illustrating the flow of an image trackingprocess;

FIG. 9 is a flowchart illustrating the flow of a process performed bythe registration unit;

FIG. 10 is a block diagram illustrating an example of the hardwareconfiguration of a computer that implements the same function as thatperformed by the image processing device;

FIG. 11 is a schematic diagram illustrating an example of an ARtechnology;

FIG. 12 is a schematic diagram illustrating a conventional technology 1that obtains the position and the orientation of a camera;

FIG. 13 is a schematic diagram illustrating the conventional technology1 that creates a three-dimensional map;

FIG. 14 is a schematic diagram illustrating an example of a definitionof the image capturing direction of the camera;

FIG. 15 is a schematic diagram illustrating a conventional technology 2;

FIG. 16 is a schematic diagram (1) illustrating a problem of theconventional technology; and

FIG. 17 is a schematic diagram (2) illustrating a problem of theconventional technology.

DESCRIPTION OF EMBODIMENTS

Preferred embodiments of the present invention will be explained withreference to accompanying drawings. Furthermore, the present inventionis not limited to the embodiments.

FIG. 1 is a functional block diagram illustrating the configuration ofan image processing device according to an embodiment. As illustrated inFIG. 1, an image processing device 100 is connected to the camera 50.The image processing device 100 includes a communication unit 110, aninput unit 120, a display unit 130, a storage unit 140, and a controlunit 150.

The camera 50 is a device that captures an image present in an imagecapturing range and that outputs information on the captured image tothe image processing device 100. The camera 50 may also directly beconnected to the image processing device 100 in a wired manner or mayalso be connected to the image processing device 100 via a network. In adescription below, the information on the image captured by the camera50 is referred to as a captured image data.

The communication unit 110 is a processing unit that is connected to anexternal device (not illustrated) or the like via the network and thatperforms data communication with the external device. The communicationunit 110 corresponds to a communication device, such as a networkinterface card (NIC), or the like.

The input unit 120 is an input device that is used to input variouskinds of information to the image processing device 100. The input unit120 corresponds to a keyboard, a mouse, a touch panel, or the like.

The display unit 130 is a display device that displays the informationoutput from the control unit 150. The display unit 130 corresponds to aliquid crystal display, a touch panel, or the like.

The storage unit 140 includes a captured image table 141, a recognitionpurpose image table 142, a feature point map information 143, and aposition-and-orientation information 144. The storage unit 140corresponds to a semiconductor memory device, such as a random accessmemory (RAM), a read only memory (ROM), a flash memory, or the like, ora storage device, such as a hard disk drive (HDD), or the like.

The captured image table 141 is a table that stores therein capturedimage data on the images captured by the camera 50.

The recognition purpose image table 142 is a table that stores thereinvarious kinds of information related to the recognition purpose imagedata. The recognition purpose image is an image used for a recognitionprocess, which will be described later, and corresponds to a photograph,an illustration, an icon, or the like.

FIG. 2 is a schematic diagram illustrating an example of the datastructure of a recognition purpose image table. As illustrated in FIG.2, the recognition purpose image table 142 associates the identificationinformation, the recognition purpose image, the feature pointcoordinates, and the feature amount. The identification information isinformation for uniquely identifying the recognition purpose image. Therecognition purpose image is data on a recognition purpose image. Thefeature point coordinates are the three-dimensional coordinates of eachof the feature points included in the recognition purpose image. Thefeature amount indicates a feature amount of each of the feature points.For example, the feature amount represents the shading distribution of aplurality of pixels in the vicinity of the feature points.

In the recognition purpose image table 142, a combination of theidentification information and a recognition purpose image is previouslystored in the recognition purpose image table 142. The information onthe feature points coordinates and the feature amounts associated withthe recognition purpose image data is set by a registration unit 152,which will be described later.

The feature point map information 143 holds the information related tothe map point that is used to estimate the position and the orientationof the camera 50. FIG. 3 is a schematic diagram illustrating an exampleof the data structure of feature point map information. As illustratedin FIG. 3, the feature point map information 143 associates the number,the map point coordinates, the feature amount, and the classification.The number is the number for uniquely identifying the map point. The mappoint coordinates are the three-dimensional coordinates of the map pointand includes the x coordinate, the y coordinate, and the z coordinate.The feature amount indicates the feature amount of the map point. Forexample, the feature amount represents the shading distribution of theplurality of the pixels in the vicinity of the feature points associatedwith the map points. The classification is information for identifyingwhether the subject map point is associated with the feature pointinside the recognition purpose image or is associated with the featurepoint outside the recognition purpose image external. If the map pointis associated with the feature point inside the recognition purposeimage, the classification is represented by an “internal point”. If themap point is associated with the feature point outside the recognitionpurpose image, the classification is represented by an “external point”.

The position-and-orientation information 144 is information on theposition and the orientation of the camera 50 at present. For example,the position-and-orientation information 144 is associated with thetranslation matrix T and the rotation matrix R with respect to theorigin of the world coordinate system. The position-and-orientationinformation is updated by a position-and-orientation estimating unit155, which will be described later.

The control unit 150 includes an acquiring unit 151, the registrationunit 152, an image recognition unit 153, a map information creating unit154, the position-and-orientation estimating unit 155, and a contentcreating unit 156. The control unit 150 can be implemented by a centralprocessing unit (CPU), a micro processing unit (MPU), or the like.Furthermore, the control unit 150 can also be implemented by hard wiredlogic, such as an application specific integrated circuit (ASIC), afield programmable gate array (FPGA), or the like.

The acquiring unit 151 is a processing unit that acquires captured imagedata from the camera 50. The acquiring unit 151 registers the acquiredcaptured image data in the captured image table 141.

The registration unit 152 divides the recognition purpose image datainto a plurality of areas and selects the feature points of therecognition purpose image data such that the number of feature pointsincluded in each of the areas is not biased. The registration unit 152registers the feature point coordinates and the feature amounts of theselected feature points in the recognition purpose image table 142 byassociating both the feature point coordinates and the feature amountswith the recognition purpose image data.

Here, the maximum number of feature points that are used in therecognition purpose image data is determined in order to prevent anincrease in processing time. In the embodiment, as an example, themaximum number of feature points is set to “n”. In the conventionaltechnology, regarding the feature points detected from all of the piecesof the recognition purpose image data, the feature points having astrong characteristic are selected with priority. As a pixel that is inthe vicinity of the feature point and that has a larger shadingdifference, the feature point has a strong characteristic. Consequently,in the conventional technology, there may be a case in which the featurepoints are concentrated on a specific area in an image depending on thecontent of the recognition purpose image data.

The registration unit 152 sequentially performs a first to thirdprocesses described below in order to prevent the feature points frombeing concentrated in a specific area in the recognition purpose imagedata. FIG. 4 is a schematic diagram illustrating a process performed bya registration unit.

The first process will be described. The registration unit 152 extracts“m” feature points from the recognition purpose image data. Here, it isassumed that m>n. The values of m and n are previously set. In anexplanation illustrated in FIG. 4, it is assumed that n=400 and m=800.As indicated by Step S10 illustrated in FIG. 4, the registration unit152 detects 800 feature points from a recognition purpose image data 40.

The second process will be described. The registration unit 152 checksthe distribution of the feature points in the recognition purpose imagedata. The registration unit 152 divides the recognition purpose imagedata into “k” areas and counts the number of feature points included ineach of the areas. In the example indicated by Step S11 illustrated inFIG. 4, the registration unit 152 divides the recognition purpose imagedata 40 into four areas of 40 a, 40 b, 40 c, and 40 d. The registrationunit 152 counts the number of feature points in each of the areas 40 ato 40 d. For example, it is assumed that the number of feature points inthe area 40 a is 100, the number of feature points in the area 40 b is320, the number of feature points in the area 40 c is 60, and the numberof feature points in the area 40 d is 320.

The third process will be described. The registration unit 152 selectsthe feature points in each of the areas such that the number of featurepoints in the individual areas approaches “n/k”. In a case of theoccurrence of an area in which the number of feature points is less than“n/k”, the registration unit 152 increases the number of feature pointsincluded in the other areas such that “n” feature points are selected asa whole.

In the example indicated by Step S12 illustrated in FIG. 4, because thestate is n=100 and k=4, the registration unit 152 selects the featurepoints such that the number of feature points detected from each of theareas 40 a to 40 d approaches “400/4=100”. For example, the registrationunit 152 selects “120” feature points from “320” feature points that areincluded in the area 40 b. The registration unit 152 selects “120”feature points from “320” feature points that are included in the area40 d. For example, the registration unit 152 sorts the feature pointsincluded in the areas in the order in which the shading difference ofthe pixel in the vicinity of the feature points is large and selects thetop 120 feature points.

Furthermore, regarding the area 40 a, the registration unit 152 does notselect the feature points because the number of feature points isoriginally 100. Regarding the area 40 c, the registration unit 152 doesnot select the feature points because only “60” feature points arepresent. The sum of the number of feature points in the areas 40 a to 40d after the selection becomes “400”.

The registration unit 152 repeatedly performs the processes describedabove on each of the pieces of the recognition purpose image data andselects the feature points such that a bias of the number of featurepoints included in each of the areas becomes small. The registrationunit 152 registers the feature point coordinates and the feature amountsof the selected feature points in the recognition purpose image table142 by associating the feature point coordinates and the feature amountswith the recognition purpose image data. Furthermore, because therecognition purpose image data is assumed to be a plane, the coordinateof the z-axis is zero.

A description will be given here by referring back to FIG. 1. The imagerecognition unit 153 compares the latest captured image data stored inthe captured image table 141 with each of the pieces of the recognitionpurpose image data stored in the recognition purpose image table 142.The image recognition unit 153 determines, based on the comparisonresult, the recognition purpose image data included in the capturedimage data.

For example, as described in FIG. 15, the image recognition unit 153compares the feature amounts of the feature points in the captured imagedata with the feature amounts of the feature points in each of thepieces of the recognition purpose image data and determines that therecognition purpose image data in which the matched rate of the featureamounts is the greatest is included in the captured image. Furthermore,if the matched rate is less than a threshold in the recognition purposeimage data in which the matched rate of the feature amounts is thegreatest, the image recognition unit 153 determines that the recognitionpurpose image data is not present in the captured image data.

If the image recognition unit 153 determines that the recognitionpurpose image data is included in the captured image data, thisindicates that the recognition performed by the image recognition unit153 has been successful. If the recognition has been successful, theimage recognition unit 153 outputs the captured image data and theinformation on the recognition purpose image data included in thecaptured image data to the map information creating unit 154. Forexample, in the information on the recognition purpose image data, thefeature point coordinates in the recognition purpose image data and thearea information on the captured image data in which the recognitionpurpose image data is present are included.

Furthermore, if the recognition has been successful, the imagerecognition unit 153 outputs both the captured image data and theinformation on the recognition purpose image data to theposition-and-orientation estimating unit 155. Theposition-and-orientation estimating unit 155 calculates the initialvalue of the position and the orientation of the camera 50 by using theinformation acquired from the image recognition unit 153.

The map information creating unit 154 is a processing unit that uses, ifthe recognition performed by the image recognition unit 153 has beensuccessful, the feature point coordinates in the recognition purposeimage data included in the captured image data and that creates thefeature point map information 143. A description will be given of aprocess in which the map information creating unit 154 calculates theinitial value of the feature point map information 143 and updates thefeature point map information 143.

First, a description will be given of a process in which the mapinformation creating unit 154 calculates the initial value of thefeature point map information 143. If the recognition performed by theimage recognition unit 153 is successful first time since a tracking hasbeen started, the map information creating unit 154 calculates theinitial value of the feature point map information 143. The mapinformation creating unit 154 classifies the area of the captured imagedata into an internal area and an external area. The internal area is anarea in which the recognition purpose image data is present in the areaof the captured image data. The external area is an area in which therecognition purpose image data is not present in the area of thecaptured image data.

FIG. 5 is a schematic diagram illustrating an internal area and anexternal area. As illustrated in FIG. 5, the map information creatingunit 154 classifies the area of a captured image data 45 into aninternal area 45A and an external area 45B. In the internal area 45A,recognition purpose image data 46 is present. Each of the circular dotsin the internal area 45A indicates the feature point and corresponds toeach of the feature points in the recognition purpose image data 46. Thetriangle symbols in the external area 45B correspond to the featurepoints.

The map information creating unit 154 specifies the map pointcoordinates in the internal area 45A by using the feature pointcoordinates in the recognition purpose image data 46. For example, themap information creating unit 154 specifies the map point coordinates inthe internal area 45A by correcting the feature point coordinates in therecognition purpose image data 46 in accordance with the distance from aorigin 47 of the captured image data 45 to the internal area 45A.Furthermore, the map information creating unit 154 uses the featureamount of the feature points associated with the map point coordinatesin the internal area 45A as the feature amount of the feature points ofthe subject recognition purpose image data 46.

As another method, instead of using the feature point coordinates in therecognition purpose image data 46 as it is, the map information creatingunit 154 may also extract the feature points from the internal area 45Aby performing the matching between the feature points included in therecognition purpose image data 46. For example, the map informationcreating unit 154 performs the matching between the feature points inthe internal area 45A and the feature points of the recognition purposeimage data 46 and then extracts, from among each of the feature pointsin the internal area 45A, the feature points that match the featurepoints in the recognition purpose image data 46 as the feature points inthe internal area 45A. Because the map information creating unit 154performs the following process, it is possible to increase the number offeature points in the captured image data 45 as much as possible.

The map information creating unit 154 registers the map pointcoordinates included in the internal area 45A and the feature amountthereof in the feature point map information 143. Furthermore, if themap information creating unit 154 registers the map point coordinates inthe internal area 45A, the map information creating unit 154 sets theclassification of the subject record to “internal point”.

Regarding the map point coordinates of the external area 45B, the mapinformation creating unit 154 specifies the map point coordinates byextracting the feature points from the external area 45B. The mapinformation creating unit 154 registers the map point coordinatesincluded in the external area 45B and the feature amount thereof in thefeature point map information 143. Furthermore, when the map informationcreating unit 154 registers the map point coordinates in the externalarea 45B, the map information creating unit 154 sets the classificationof the subject record as an “external point”.

Furthermore, when extracting the feature points from the external area45B, similarly to the case in which the registration unit 152 extractsthe feature points described above, the map information creating unit154 may also divide the external area 45B into a plurality of areas andselect the feature points in the external area 45B such that a bias ofthe number of feature points included in each of the area is small.

Furthermore, because the map point coordinates in the feature point mapinformation 143 is calculated based on the principle of a stereo image,the map point coordinates are not yet decided in the stage of theinitial value. However, because the feature points included in theinternal area 45A is based on the assumption that the recognition imageis a plane, it is guaranteed that the recognition image is also arrangedon the same plane even in the three-dimensional coordinate system.Consequently, by using this characteristic, it may also possible to setthe value of the z-axis of the map point coordinate to zero and,regarding the values of the x-axis and the y-axis, a temporarycoordinate values may also be set by using various kinds of imageprocessing.

Subsequently, a process in which the map information creating unit 154updates the feature point map information 143 will be described. Afterthe map information creating unit 154 creates the initial value of thefeature point map information 143 by using the processes describedabove, if the recognition performed by the image recognition unit 153has been successful, the map information creating unit 154 determineswhether the recognition purpose image data that is present on thecaptured image data has been moved. For example, by comparing the mappoint coordinates in the recognition purpose image data that is presenton the current captured image data with the map point coordinates thatis associated with the classification of the “internal point” in thefeature point map information 143, if the map point coordinates aredifferent, it is determined that the recognition purpose image data hasbeen moved. If the recognition purpose image data has not been moved,the map information creating unit 154 skips the process of updating thefeature point map information 143.

If the map information creating unit 154 determines that the recognitionpurpose image data has been moved, the map information creating unit 154updates the feature point map information 143. FIG. 6 is a schematicdiagram illustrating an update process performed on the feature pointmap information. In the example illustrated in FIG. 6, the internal area(area of the recognition purpose image data) 45A on the captured imagedata 45 has been moved to the internal area (area of the recognitionpurpose image data) 45C. Furthermore, there is no change in the mappoint coordinates in the external area 45B. In this case, the mapinformation creating unit 154 updates only the map point coordinatesthat correspond to the classification of the “internal point” from amongthe map point coordinates in the feature point map information 143. Forexample, the map information creating unit 154 updates the map pointcoordinates by moving the map point coordinates by an amountcorresponding to the move amount of the recognition purpose image data.

In the example illustrated in FIG. 6, a case in which the recognitionpurpose image data has been moved and the map point coordinates in theexternal area are not changed has been described. In contrast, if thefeature points in the external area 45B are changed, the map informationcreating unit 154 again extracts the feature points from the externalarea 45B and updates, from among the map point coordinates associatedwith the extracted feature points, the map point coordinates in whichthe classification is the “external point” from among the map pointcoordinates in the feature point map information 143. Furthermore, if abias is present in the distribution of the feature points specified fromthe captured image data, the map information creating unit 154 returns,as a failure of the process, the information in the feature point mapinformation 143 to the information indicated before the update, acquiresnew captured image data, and again performs the update process.

The map information creating unit 154 may also determine how thedistribution of the feature points is biased. For example, the mapinformation creating unit 154 divides the captured image data intoareas. The map information creating unit 154 compares the average valueof the number of feature points included in each of the areas with thescores of the feature points in each of the areas and determines that,if there is the area in which a difference value of the score is equalto or greater than a threshold, the distribution of the feature pointsis biased.

Furthermore, the map information creating unit 154 associates theposition of the feature points of the captured image data obtained lasttime with the feature points of the captured image data obtained thistime and calculates, based on the principle of stereo image capturing,the map point coordinates associated with the feature points.

The position-and-orientation estimating unit 155 is a processing unitthat estimates the position and the orientation of the camera 50 basedon the captured image data and the feature point map information 143.The position-and-orientation estimating unit 155 projects the map pointsin the feature point map information 143 on the captured image data. Theposition-and-orientation estimating unit 155 specifies the pair of thefeature points and the projection points in the captured image data. Asdescribed in Equation (4), the position-and-orientation estimating unit155 searches for a translation component T and a rotational component Rof the camera in which the sum of the difference between the pairedfeature point x_(i) and the projection point x_(i)′ of the map point isthe minimum and calculates the position and the orientation of thecamera. Although a description will be omitted here, theposition-and-orientation estimating unit 155 associates the position andthe orientation of the camera 50 for each piece of the captured imagedata that serves as a key frame. The position-and-orientation estimatingunit 155 creates the position-and-orientation information 144 on thecamera 50 and registers the information in the storage unit 140.

Furthermore, when the recognition performed by the image recognitionunit 153 is successful and the area of the recognition purpose imagedata that is included in the captured image data is specified, theposition-and-orientation estimating unit 155 calculates the initialvalue of the position and the orientation of the camera by using thefeature points that are included in the internal area. For example, thepair is specified by using the feature point coordinates in therecognition purpose image data as the map points and by performing thematching between the feature points in the internal area. Theposition-and-orientation estimating unit 155 calculates the initialvalue of the position and the orientation of the camera by searching forthe translation component T and the rotational component R of the camerain which the sum of the difference between the pair is the minimum.

The content creating unit 156 is a processing unit that arranges, basedon the position-and-orientation information 144, the previously preparedcontent on the captured image data and that displays, on the displayunit 130, the captured image data in which the content has beenarranged. The content creating unit 156 may also notify an externaldevice connected via a network of the captured image data in which thecontent has been arranged and display the captured image.

In the following, the flow of a process performed by the imageprocessing device 100 according to the embodiment will be described.FIG. 7 is a flowchart illustrating the flow of a process performed bythe image processing device according to the embodiment. The imageprocessing device 100 repeatedly performs the process illustrated inFIG. 7 every time the image processing device 100 acquires new capturedimage data.

As illustrated in FIG. 7, the acquiring unit 151 in the image processingdevice 100 acquires the captured image data (Step S101). If the imageprocessing device 100 has already created the initial value of thefeature point map information 143 (Yes at Step S102), the imageprocessing device 100 proceeds to Step S107. If the image processingdevice 100 has not yet created the initial value of the feature pointmap information 143 (No at Step S102), the image processing device 100proceeds to Step S103.

The image recognition unit 153 in the image processing device 100performs image recognition based on both the captured image data and therecognition purpose image data (Step S103). If the recognition has notbeen successful (No at Step S104), the image recognition unit 153proceeds to Step S101. If the recognition has been successful (Yes atStep S104), the image recognition unit 153 proceeds to Step S105.

The position-and-orientation estimating unit 155 in the image processingdevice 100 calculates the initial value of the position and theorientation of the camera 50 (Step S105). The map information creatingunit 154 in the image processing device 100 calculates the initial valueof the feature point map information 143 (Step S106). The mapinformation creating unit 154 and the position-and-orientationestimating unit 155 perform the image tracking process (Step S107).

If the position-and-orientation estimating unit 155 has not succeeded incalculating the position and the orientation of the camera 50 (No atStep S108), the position-and-orientation estimating unit 155 proceeds toStep S101. If the position-and-orientation estimating unit 155 hassucceeded in calculating the position-and-orientation of the camera 50(Yes at Step S108), the position-and-orientation estimating unit 155proceeds to Step S109. The content creating unit 156 in the imageprocessing device 100 displays the content (Step S109).

In the following, the flow of the image tracking process indicated atStep S107 illustrated in FIG. 7 will be described. FIG. 8 is a flowchartillustrating the flow of the image tracking process. As illustrated inFIG. 8, the position-and-orientation estimating unit 155 in the imageprocessing device 100 performs, based on the feature point mapinformation 143, the matching of the feature points and the projectionpoints on the captured image data (Step S201).

The position-and-orientation estimating unit 155 calculates the positionand the orientation of the camera 50 based on the result of the matching(Step S202). If the position-and-orientation estimating unit 155 has notsucceeded in calculating the position and the orientation of the camera50 (No at Step S203), the position-and-orientation estimating unit 155ends the image tracking process. If the position-and-orientationestimating unit 155 has succeeded in calculating theposition-and-orientation of the camera 50 (Yes at Step S203), theposition-and-orientation estimating unit 155 proceeds to Step S204.

The map information creating unit 154 in the image processing device 100classifies the feature points in which the matching has been successfulinto the internal points and the external points (Step S204). The mapinformation creating unit 154 determines whether the recognition purposeimage data has been moved (Step S205). If the recognition purpose imagedata has not been moved (No at Step S206), the map information creatingunit 154 ends the image tracking process.

In contrast, if the recognition purpose image data has been moved (Yesat Step S206), the map information creating unit 154 updates the featurepoint map information 143 (Step S207) and ends the image trackingprocess.

In the following, the flow of the process performed by the registrationunit that registers the information on the recognition purpose imagedata will be described. FIG. 9 is a flowchart illustrating the flow ofthe process performed by the registration unit. As illustrated in FIG.9, the registration unit 152 in the image processing device 100 acquiresthe recognition purpose image data (Step S301). The registration unit152 extracts m feature points from the recognition purpose image data(Step S302).

The registration unit 152 divides the recognition purpose image datainto k areas and counts the number of feature points for each of theareas (Step S303). The registration unit 152 selects the feature pointssuch that the number of the feature points included in each of the areasapproaches n/k (Step S304).

The registration unit 152 extracts the feature points and the featureamounts (Step S305). The registration unit 152 registers the informationrelated to the recognition purpose image data in the recognition purposeimage table 142 (Step S306).

In the following, the effect of the image processing device 100according to the embodiment will be described. The image processingdevice 100 divides the recognition purpose image data into a pluralityof areas, selects the feature points such that the number of the featurepoints included in each of the areas is small, and performs a trackingby using the selected feature points. Consequently, because the featurepoints on the recognition purpose image data are uniformly distributed,it is possible to continuously and stable perform the tracking by usinga recognition purpose image.

The image processing device 100 classifies the feature points into thefeature points included in the internal area and the feature pointsincluded in the external area and then registers the information on thefeature points in the feature point map information 143. For example,when only the internal area is moved, by updating only the internal areaby using the feature points in the recognition purpose image, the lateststate of the feature point map information 143 can be maintained;therefore, it is possible to reduce the processing load and also improvethe accuracy of the tracking.

If the recognition purpose image data included in the captured imagedata is moved, the image processing device 100 updates the feature pointmap information 143. Consequently, the image processing device 100 canappropriately perform the tracking in accordance with an environmentalchange.

The image processing device 100 also divides the external area into aplurality of areas, selects the feature points such that a bias of thenumber of feature points included in each of the areas is small, andperforms the tracking by using the selected feature points.Consequently, because the map points in the feature point mapinformation 143 are uniformly distributed, it is possible tocontinuously and stably perform the tracking by using the feature pointmap information 143.

In the following, an example of the hardware configuration of a computerthat implements the same function as that performed by the imageprocessing device 100 according to the embodiment described above. FIG.10 is a block diagram illustrating an example of the hardwareconfiguration of a computer that implements the same function as thatperformed by the image processing device.

As illustrated in FIG. 10, a computer 200 includes a CPU 201 thatexecutes various kinds of arithmetic processing, an input device 202that receives an input of data from a user, and a display 203.Furthermore, the computer 200 includes a reading device 204 that readsprograms or the like from a storage medium and an interface device 205that sends and receives data to and from another computer via a network.The computer 200 includes a camera 206. Furthermore, the computer 200includes a RAM 207 that temporarily stores therein various kinds ofinformation and a hard disk device 208. Then, each of the devices 201 to208 are connected to a bus 209.

The hard disk device 208 includes an acquiring program 208 a, aregistration program 208 b, an image recognition program 208 c, a mapinformation creating program 208 d, a position-and-orientationestimating program 208 e, and a content creating program 208 f. The CPU201 reads the acquiring program 208 a, the registration program 208 b,the image recognition program 208 c, the map information creatingprogram 208 d, the position-and-orientation estimating program 208 e,and the content creating program 208 f and loads the programs into theRAM 207.

The acquiring program 208 a functions as an acquiring process 207 a. Theregistration program 208 b functions as a registration process 207 b.The image recognition program 208 c functions as an image recognitionprocess 207 c. The map information creating program 208 d functions as amap information creating process 207 d. The position-and-orientationestimating program 208 e functions as a position-and-orientationestimating process 207 e. The content creating program 208 f functionsas a content creating process 207 f.

The process of the acquiring process 207 a corresponds to the processperformed by the acquiring unit 151. The process of the registrationprocess 207 b corresponds to the process performed by the registrationunit 152. The process of the image recognition process 207 c correspondsto the process performed by the image recognition unit 153. The processof the map information creating process 207 d corresponds to the processperformed by the map information creating unit 154. The process of theposition-and-orientation estimating process 207 e corresponds to theprocess performed by the position-and-orientation estimating unit 155.The process of the content creating process 207 f corresponds to theprocess performed by the content creating unit 156.

Furthermore, each of the programs 208 a to 208 f does not need to bestored in the hard disk device 208 in advance from the beginning. Forexample, each of the programs is stored in a “portable physical medium”,such as a flexible disk (FD), a CD-ROM, a DVD disk, a magneto-opticdisk, an IC CARD, or the like that is to be inserted into the computer200. Then the computer 200 may also read and execute each of theprograms 208 a to 208 f from the portable physical medium.

It is possible to continuously and stably perform a tracking by using arecognition purpose image.

All examples and conditional language recited herein are intended forpedagogical purposes of aiding the reader in understanding the inventionand the concepts contributed by the inventor to further the art, and arenot to be construed as limitations to such specifically recited examplesand conditions, nor does the organization of such examples in thespecification relate to a showing of the superiority and inferiority ofthe invention. Although the embodiment of the present invention has beendescribed in detail, it should be understood that the various changes,substitutions, and alterations could be made hereto without departingfrom the spirit and scope of the invention.

What is claimed is:
 1. An image processing device comprising: a memory;and a processor coupled to the memory, wherein the processor executes aprocess comprising: dividing a recognition purpose image into aplurality of areas; selecting feature points in the recognition purposeimage such that a bias of the number of the feature points included ineach of the areas is small; registering information on the selectedfeature points in the recognition purpose image in the memory; andestimating a position and an orientation of the camera based on therecognition purpose image registered in the memory and based on acaptured image captured by a camera.
 2. The image processing deviceaccording to claim 1, the process further comprising registering each ofthe information on the feature points in the recognition purpose imageand information on the feature points in a peripheral image that isinside the captured image and that is outside the recognition purposeimage in map information when the recognition purpose image included inthe captured image is recognized based on the feature points in thecaptured image and based on the feature points in the recognitionpurpose image, wherein the estimating estimates the position and theorientation of the camera based on the map information.
 3. The imageprocessing device according to claim 2, the process further comprisingdetecting a change in the position of the recognition purpose imageincluded in the captured image and updating the map information, whenthe detecting detects the change.
 4. The image processing deviceaccording to claim 2, the process further comprising dividing theperipheral image into a plurality of areas, selecting the feature pointsin the peripheral image such that a bias of the number of the featurepoints included in each of the areas is small, and registeringinformation on the selected feature points in the map information.
 5. Animage processing method comprising: dividing a recognition purpose imageinto a plurality of areas, using a processor; selecting feature pointsin the recognition purpose image such that a bias of the number of thefeature points included in each of the areas is small, using theprocessor; registering information on the selected feature points in therecognition purpose image in a memory, using the processor; andestimating a position and an orientation of the camera based on therecognition purpose image registered in the memory and based on acaptured image captured by a camera, using the processor.
 6. The imageprocessing method according to claim 5, the image processing methodfurther comprising registering each of the information on the featurepoints in the recognition purpose image and information on the featurepoints in a peripheral image that is inside the captured image and thatis outside the recognition purpose image in map information when therecognition purpose image included in the captured image is recognizedbased on the feature points in the captured image and based on thefeature points in the recognition purpose image, wherein the estimatingestimates the position and the orientation of the camera based on themap information.
 7. The image processing method according to claim 6,the image processing method further comprising detecting a change in theposition of the recognition purpose image included in the captured imageand updating the map information, when the detecting detects the change.8. The image processing method according to claim 6, the imageprocessing method further comprising dividing the peripheral image intoa plurality of areas, selecting the feature points in the peripheralimage such that a bias of the number of the feature points included ineach of the areas is small, and registering information on the selectedfeature points in the map information.
 9. A non-transitorycomputer-readable recording medium having stored therein an imageprocessing program that causes a computer to execute a processcomprising: dividing a recognition purpose image into a plurality ofareas; selecting feature points in the recognition purpose image suchthat a bias of the number of the feature points included in each of theareas is small; registering information on the selected feature pointsin the recognition purpose image in a memory; and estimating a positionand an orientation of the camera based on the recognition purpose imageregistered in the memory and based on a captured image captured by acamera.
 10. The non-transitory computer-readable recording mediumaccording to claim 9, the process further comprising registering each ofthe information on the feature points in the recognition purpose imageand information on the feature points in a peripheral image that isinside the captured image and that is outside the recognition purposeimage in map information when the recognition purpose image included inthe captured image is recognized based on the feature points in thecaptured image and based on the feature points in the recognitionpurpose image, wherein the estimating estimates the position and theorientation of the camera based on the map information.
 11. Thenon-transitory computer-readable recording medium according to claim 10,the process further comprising detecting a change in the position of therecognition purpose image included in the captured image and updatingthe map information, when the detecting detects the change.
 12. Thenon-transitory computer-readable recording medium according to claim 10,the process further comprising dividing the peripheral image into aplurality of areas, selecting the feature points in the peripheral imagesuch that a bias of the number of the feature points included in each ofthe areas is small, and registering information on the selected featurepoints in the map information.